<cfscript>    
    view = createObject("component", session.rootDir & ".views.layout");
    if( Session.Auth EQ True and (Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR) ){
        view.init("Badge Creation Report","","","Home",index);
    }else{
        view.init("Denied","","","Home","Denied");
    }    
    view.html();
</cfscript>

<cffunction name="index" access="public" output="true" returntype="any">
    <cfscript>
        import models.*;
        KronosQueries = CreateObject("component", session.rootDir & ".DatabaseQueries.Kronos");
        StepActions = ORMExecuteQuery("FROM StepActions WHERE StepID = 16 AND ActTimeStamp IS NULL");
        URL.StepID = -1;
    </cfscript>
    <script language="javascript">
        window.print();
    </script>
    <h1 class="title">EPLS Failed Report</h1>
    <div class="entry">
        <cfform name="frmEPLSFailed" >        
            <cfinput type="hidden" name="StepID" value="#URL.StepID#" />    
            <table width = 100%>
                <tr>
                    <td>&nbsp;</td> 
                </tr>
               <tr>
                    <td><strong>##</strong></td>
                    <td><strong><u>SCF Name</u></strong></td>
                    <td><strong><u>EPLS Name</u></strong></td>
                    <td><strong><u>SSN</u></strong></td>
                </tr>
                
                <cfloop from="1" to="#ArrayLen(StepActions)#" index="i">
                    <cfset Employee = ORMExecuteQuery("FROM Employee WHERE EmployeeID = " & StepActions[i].getEmployeeID() & " AND NonSCFTypeID IS NULL") />
                    <cfif ArrayLen(Employee) NEQ 0>
                        <cfset PositionInfo = KronosQueries.funcGetPositionInfo(Employee[1].getPositionID()) />
                        <cfset Depts = KronosQueries.funcGetDepts(Employee[1].getDepartmentID()) />
                        <tr>
                            <td>#i#)</td>  
                            <td valign="top" nowrap="nowrap">#Employee[1].getFullName()#</td>
                            <td valign="top" nowrap="nowrap">#Employee[1].getFirstName()# #Employee[1].getFirstName()#</td>
                            <td valign="top">#Employee[1].getSSN()#</td>
                        </tr>
                    </cfif>
                </cfloop>                
            </table>          
        </cfform>
    </div>
</cffunction>